/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package obj;

import org.json.me.JSONArray;
import org.json.me.JSONException;
import org.json.me.JSONObject;

/**
 *
 * @author kUN
 */
public class objResponseScore {
 //   private String api_status;
    private ObjDiem[] objdiems;
    public int leng;
 
    public ObjDiem[] getObjDiems()
    {
        return objdiems;
    }
    public void setObjDiems(ObjDiem[] diem)
    {
        this.objdiems=diem;
    }
    public void fromJSON(String jsonString)
    {
        try{
            JSONObject json=new JSONObject(jsonString);
            JSONArray jsonArray=json.getJSONArray("objdiems");            
            int total=jsonArray.length();
            ObjDiem[] objdiems1=new ObjDiem[total];
            for(int i=0;i<total;i++)
            {
                String objdiemsJSON=jsonArray.getString(i);
                objdiems1[i]=new ObjDiem();
                objdiems1[i].fromJSON(objdiemsJSON);
            }
            leng=objdiems1.length;
            
           setObjDiems(objdiems1);
        }catch(JSONException ex){
            ex.printStackTrace();
            
        };
        
    }
}
